package com.red.star.wechat.data.mappers;

import com.red.star.wechat.data.core.base.MyMapper;
import com.red.star.wechat.data.entity.CouponPackageRelation;
import com.red.star.wechat.data.entity.Mall;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author xuquanyu
 * @date 2018/9/9.
 * 中间表管理
 */
public interface CouponPackageRelationMapper extends MyMapper<CouponPackageRelation> {

    List<CouponPackageRelation> couponPackageRelationList(@Param("id") Integer id);

    List<Mall> selectMallColeByRole (@Param("role") String role);

    @Select(value = "select * from t_package_coupon_relation where coupon_id  = #{couponId} and package_coupon_id = #{packageCouponId}")
     CouponPackageRelation couponPackageRelationByCouponId(@Param("packageCouponId") Integer packageCouponId ,@Param("couponId") Integer couponId);

}
